package com.tourlaid.mamagerment.mapper

import com.tourlaid.mamagerment.entity.ShopGoods
import org.apache.ibatis.annotations.Param

/**
 * Created by xiaoyongge on 2017/7/19.
 */

interface ShopGoodsMapper {

    fun getById(id: Long): ShopGoods?;

    fun insert(record: ShopGoods);

    fun queryForList(): List<ShopGoods>

    fun getByShopIdAndGoodsId(@Param("shopId") shopId: Long?, @Param("goodsId") goodsId: Long?): ShopGoods?

    fun plusStock(@Param("id") id: Long?, @Param("stock") stock: Int?, @Param("editor") editor: Long?)

    fun minusStock(@Param("id") id: Long?, @Param("stock") stock: Int?, @Param("editor") editor: Long?)
}